<template>
  <Tx-Sider
    setofbooks-show
    no-base-two-menu
    :is-systems="isSystems"
    :is-modules="isModules"
    :menu-title="menuTitle"
    @router-replace="routerReplace"
    @router-push="routerPush"
    @change-system-or-module="changeSystemOrModule"
  />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const isSystems = ref<any>('BasisSystem')
const isModules = ref<any>(JSON.parse(localStorage.getItem('selectModule') || '{}').key || '')
const menuTitle = ref<any>(JSON.parse(localStorage.getItem('selectModule') || '{}').title || '')
const routerReplace = url => {
  router.replace(url)
}
const routerPush = url => {
  router.push(url)
}
const changeSystemOrModule = () => {
  menuTitle.value = JSON.parse(localStorage.getItem('selectModule') || '{}').title || ''
}
</script>

<style scoped></style>
